import { createApp } from 'vue'
import LargeCombine from './components/public-large/chart-combine/index.vue'
import LargeTable from './components/public-large/chart-table/index.vue'
import { createPinia } from 'pinia'
import ArcoVueIcon from '@arco-design/web-vue/es/icon'
import ArcoVue from '@arco-design/web-vue'
import '@arco-design/web-vue/dist/arco.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@arco-themes/vue-ykite-theme/index.less'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import router from './router'
import App from './App.vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(router)
app.use(ArcoVue)
app.use(ArcoVueIcon)
app.use(ElementPlus)
app.component('LargeCombine', LargeCombine)
app.component('LargeTable', LargeTable)
app.use(createPinia()).mount('#app')

window.addEventListener('popstate', function (){
    history.pushState(null, document.URL)
})